package com.zjj.day2.Test6;

/**
 * @author zhoujunjie
 * @desc TODO
 * @date 2025/4/20
 */
import java.util.ArrayList;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        // 创建用户
        User user = new User("张三");
        User user1 = new User("李四");

        // 创建货物
        Goods goods1 = new Goods("手机", 5000);
        Goods goods2 = new Goods("电脑", 8000);
        Goods goods3 = new Goods("平板",2000);
        List<Goods> goodsList = new ArrayList<>();
        List<Goods> goodsList1 = new ArrayList<>();
        goodsList.add(goods1);
        goodsList.add(goods2);
        goodsList1.add(goods3);

        // 下单
        String orderId = "001";
        String orderId1 = "002";
        Order order = user.placeOrder(orderId, goodsList);
        Order order1 = user1.placeOrder(orderId1, goodsList1);

        // 查看商品详情信息
        order.viewGoodsDetails();
        order1.viewGoodsDetails();
    }
}
